package com.springboot.metrics;

import org.springframework.stereotype.Component;

import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;

@Component
public class CounterService {
    
    public CounterService(){
        Metrics.addRegistry(new SimpleMeterRegistry());
    }

    public void counter(String name, String... tags){

        var counter = Metrics.counter(name, tags);

        counter.increment();
    }
}
